<!-- <div>
    <button type="button" class="btn btn-outline-success" (click) = "addTeacher()">添加</button> 
</div> -->
        
        <div>
            <div class="input-group input-group-sm mb-3">
                <div class="input-group-prepend">
                 <span class="input-group-text" id="inputGroup-sizing-sm">教师名称:</span>
                </div>
                <input type="text" [(ngModel)]="r.name" class="form-control" aria-label="Sizing example input" aria-describedby="inputGroup-sizing-sm">
                <div class="input-group-prepend">
                    <button type="button" class="btn btn-outline-success" (click) = "addTeacher()">添加</button> 
                </div> 
            </div>
                <button type="button" class="btn btn-outline-primary" (click)="save()">保存</button>
                <button type="button" class="btn btn-outline-danger" (click)="goBack()">取消</button>
        </div>



<table class="table">
    <tr>
    <th>教师名称</th>
    <th>操作</th>
    </tr>
    
    <tr *ngFor="let r of rl">
    <td>{{r.name}}</td>
    <td>
        <button type="button" class="btn btn-outline-warning" (click)="toupdate(r)">修改</button>
        <button type="button" class="btn btn-outline-danger" (click)="deleteTeacher(r)">删除</button>
    </td>
    </tr>
    
    </table>